﻿<UserControl x:Class="Sautom.Modules.EventNortification.Views.EventNotificationList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:res="clr-namespace:Sautom.I18N;assembly=Sautom.I18N" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <ListBox ItemsSource="{Binding Notifications}">
        <ListBox.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#8285ABCC" Offset="0.528" />
                <GradientStop Color="#27344476" Offset="1" />
            </LinearGradientBrush>
        </ListBox.Background>
      <ListBox.ItemTemplate>
            <DataTemplate>
                <Border BorderThickness="2" BorderBrush="Black" MaxWidth="175">
                    <StackPanel>
                        <!--todo type icon -->
                        <TextBlock Margin="2,2,2,2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Message}" Foreground="Navy" />
                        <Button Content="{Binding Source={x:Static res:EventNotificationResources.ProcessBtn}}" HorizontalAlignment="Right"
                            Command="{Binding Path=DataContext.GoToEventCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" 
                            CommandParameter="{Binding Id}"/>
                    </StackPanel>
                </Border>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</UserControl>
